Public Class TrackBarDemo
    Public Red As Byte
    Public Green As Byte
    Public Blue As Byte
    Public Background As Color

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        Red = TrackBar1.Value
        Background = Color.FromArgb(Red, Green, Blue)
        Me.BackColor = Background
    End Sub

    Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
        Green = TrackBar2.Value
        Background = Color.FromArgb(Red, Green, Blue)
        Me.BackColor = Background

    End Sub

    Private Sub TrackBar3_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar3.Scroll
        Blue = TrackBar3.Value
        Background = Color.FromArgb(Red, Green, Blue)
        Me.BackColor = Background
    End Sub


End Class
